<template>
    <div id="background">
        <el-container>
            <el-header id="cstxHead">
                <el-row type="flex" style="height:80%;display:flex;align-items: flex-end">
                    <el-col :xs="3" :sm="3" :md="3" class="imgCol">
                        <img v-bind:src="backIcon" class="backSize" @click="back" />
                    </el-col>
                    <el-col :xs="6" :sm="6" :md="6" :offset="6" class="imgCol">
                        <span class="titleSize">{{ceShiName+'测试'}}</span>
                    </el-col>
                </el-row>
            </el-header>
            <el-main id="cstxMain">
                <el-row v-for="value in ceShiType" :key="value">
                    <el-row type="flex" class="csbtn" >
                        <button class="tklxbtn" >
                            <span class="tklxBtnWords">{{value+'理论测试'}}</span>
                           <span> 
                               <img :src="jianTou" class="jtImg">
                            </span>
                        </button>
                    </el-row>
                </el-row>
            </el-main>
        </el-container>
    </div>
</template>

<script>
import backIcon from '../../assets/img/mine/back.png'
import jianTou from '../../assets/img/tiKu/jianTou.png'
export default {
     data(){
        return{
            jianTou:jianTou,
            ceShiName:'电工',
            ceShiType:['低压电工','高压电工','电工中级证','电工高级证','电工技师证','电工高级技师证'],
            ceShiLeiXing:'电工',
            backIcon:backIcon,
            normalHeight:document.documentElement.clientHeight,
        }
    },
    mounted(){
        var bg = document.getElementById("background");
       // this.normalHeight=document.documentElement.clientHeight;
        console.log("height:"+this.normalHeight);
        bg.style.height = this.normalHeight+"px";
        bg.style.backgroundColor = "#FFFFFF"
        bg.style.margin = "0px";

        var head=document.getElementById("cstxHead");
        var headHeight=this.normalHeight/30 *4 ;
        console.log("headHeight:"+headHeight);
        head.style.height=headHeight+"px";

        var main=document.getElementById("cstxMain");
        var mainHeight=this.normalHeight/30 *24 ;
        main.style.height=mainHeight+"px";
    },
    methods:{
        back(){
            console.log("back:");
            this.$router.go(-1);
        },
    }
}
</script>

<style>
.jtImg{
    width:20px;
    height:10px;
}
.tklx{
    position: relative;
    top:20%;
}
.csbtn{
    display: flex;
    justify-content: center;
    align-items: center;
}
.tklxBtnWords{
    text-align: center;
    font-size: 16px;
    font-weight: 400;
    color: #F0F0F0;
}
.tklxbtn{
    line-height: 30px;
    width: 80%;
    background-color: #53cdf5;
    border-style: none;
    outline: none;
    margin:15px;
    -webkit-border-radius: 25px;
    -moz-border-radius: 25px;
    -ms-border-radius: 25px;
    -o-border-radius: 25px;
    border-radius: 25px;
}
#cstxMain{
    padding: 15px;
    background: #FFFFFF;
}
#cstxHead {
  background-color: #53cdf5;
}
.backSize{
    height: 26px;
}
.titleSize{
    font-size:1.125em;
    color:#ffffff
}
@media screen and (max-height: 600px){
  .backSize{
      height: 22px;
  }
  .titleSize{
      font-size: 1em;
  }
}
</style>
